home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / misc-part2 / 11297 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.5 KB  |  54 lines

  1. Newsgroups: comp.sys.amiga.misc
  2. Path: netcom.com!dkaupp
  3. From: dkaupp@netcom.com (Blitter)
  4. Subject: Re: Amigados - checking for a file
  5. Message-ID: <dkauppDpFLpD.J4D@netcom.com>
  6. Organization: >nil:
  7. X-Newsreader: TIN [version 1.2 PL1]
  8. References: <401.6670T240T431@nibelung.demon.co.uk>
  9. Date: Sat, 6 Apr 1996 08:17:37 GMT
  10. Sender: dkaupp@netcom19.netcom.com
  11.  
  12. Barry Shilliday (barry.1@nibelung.demon.co.uk) wrote:
  13. : What would be the format to check the existence of a file in a script for dos?
  14. : I would have thought something like this:
  15.  
  16. : If EXISTS blah:filename
  17. :   dowhatever
  18. :   else
  19. :    dothatinstead
  20. :    endif
  21. : endif
  22.  
  23. : but this doesn't work.
  24.  
  25.  I'm not sure if you mean the else doesn't work ( I can't check tha 
  26. manual, in the middle of moving).
  27.  
  28.  But here is (part of a)script to start a mud I have.
  29.  
  30. <start>
  31. LAB Begin
  32.     date >> logfile
  33.     /src/Envy20  >> logfile
  34. ; If someone runs shutdown the shutdown.txt file is created,
  35. ;     otherwise it was just a reboot and falls thru the if.
  36.     if exists shutdown.txt
  37.        delete shutdown.txt
  38.        quit 0
  39.     endif
  40.     wait 30
  41. skip Begin back
  42. <end>
  43.  
  44.  Hope that helps.
  45.  
  46. Regards.
  47.  
  48. -- 
  49. Dave  dkaupp@netcom.com        //                       Kell the Atheist
  50. AMIGA Technologies Homepage   //The Amiga Web Directory kills 12, claims
  51. www.amiga.de               \\//www.cucug.org/amiga.html Darwin made me do it.
  52. Quote from PC friend:'Are you on the Net?' 'Yes.' 'And you have music playing
  53. on your computer!?'.... Doh!!! Ya that and a few other things running..
  54.